home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d27
/
pgmrexit.arc
/
PGMREXIT.CLP
< prev
next >
Wrap
Text File
|
1991-12-04
|
5KB
|
59 lines
/* CRTOPT PUBAUT(*ALL) */
/*********************************************************************/
/* PROGRAM- PGMREXIT */
/* AUTHOR- GREG THIELEN */
/* DATE WRITTEN- JANUARY 1, 1985 */
/* PROGRAM DESCRIPTION- EXIT PROGRAM FOR DSPPGMMNU CMD. */
/*********************************************************************/
PGM PARM(&OPTION &PARM &TYPE &PARM2 &TEXT &LOGRQS +
&SRCFILE &SRCLIB &OBJLIB &JOBD &RQSLEN +
&RQSDTA512 &CF4 &CF11 &OBJEXIST)
DCL VAR(&OPTION) TYPE(*CHAR) LEN(2)
DCL VAR(&PARM) TYPE(*CHAR) LEN(10)
DCL VAR(&TYPE) TYPE(*CHAR) LEN(4)
DCL VAR(&PARM2) TYPE(*CHAR) LEN(21)
DCL VAR(&TEXT) TYPE(*CHAR) LEN(50)
DCL VAR(&LOGRQS) TYPE(*CHAR) LEN(4)
DCL VAR(&SRCFILE) TYPE(*CHAR) LEN(10)
DCL VAR(&SRCLIB) TYPE(*CHAR) LEN(10)
DCL VAR(&OBJLIB) TYPE(*CHAR) LEN(10)
DCL VAR(&JOBD) TYPE(*CHAR) LEN(10)
DCL VAR(&RQSLEN) TYPE(*DEC) LEN(3 0)
DCL VAR(&RQSLENQ) TYPE(*DEC) LEN(15 5)
DCL VAR(&RQSDTA512) TYPE(*CHAR) LEN(512)
DCL VAR(&CF4) TYPE(*LGL)
DCL VAR(&CF11) TYPE(*LGL)
DCL VAR(&OBJEXIST) TYPE(*LGL)
DCL VAR(&RQSDTA256) TYPE(*CHAR) LEN(256)
DCL VAR(&MSGID) TYPE(*CHAR) LEN(7)
DCL VAR(&MSGF) TYPE(*CHAR) LEN(10)
DCL VAR(&MSGFLIB) TYPE(*CHAR) LEN(10)
DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(132)
CHKOBJ OBJ(&SRCFILE.&SRCLIB) OBJTYPE(*FILE) +
MBR(&PARM) AUT(*OPER *READ)
MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(RCVMSG))
OVRDBF FILE(SRCFILE) TOFILE(&SRCFILE.&SRCLIB) +
MBR(&PARM) SECURE(*YES)
CALL PGM(PMRGSRCO) PARM(&RQSDTA512 &RQSLEN)
DLTOVR FILE(SRCFILE)
CHGVAR VAR(&RQSLENQ) VALUE(&RQSLEN)
CALL PGM(QCACHECK) PARM(&RQSDTA512 &RQSLENQ)
MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(RCVMSG))
IF COND(&RQSLEN *GT 256) THEN(SNDPGMMSG +
MSGID(CPF9898) MSGF(QCPFMSG) +
MSGDTA('Request data length is greater than +
256. Command cannot be submitted') +
MSGTYPE(*ESCAPE))
CHGVAR VAR(&RQSDTA256) VALUE(&RQSDTA512)
SBMJOB JOB(&PARM) JOBD(&JOBD) RQSDTA(&RQSDTA256) +
LOG(0)
MONMSG MSGID(CPF0000)
RCVMSG: RCVMSG MSGDTA(&MSGDTA) MSGID(&MSGID) MSGF(&MSGF) +
MSGFLIB(&MSGFLIB)
IF COND(&MSGID *NE ' ') THEN(DO)
SNDPGMMSG MSGID(&MSGID) MSGF(&MSGF.&MSGFLIB) +
MSGDTA(&MSGDTA)
GOTO CMDLBL(RCVMSG)
ENDDO
ENDPGM